
/************
Ten tac gia : Ly Thien kim
Ngay tao : 8/16/2011
Noi dung : Delete 1 ROLE_MENU
************/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE NAME = 'sp_DeleteROLE_MENU')
BEGIN
	DROP PROC sp_DeleteROLE_MENU
END
GO
CREATE PROC sp_DeleteROLE_MENU
	@IDMENU				int,
	@IDROLE				int,
	@Result				int out
	AS
	BEGIN
		IF EXISTS (SELECT * FROM ROLE_MENU WHERE  @IDMENU = IDMENU and @IDROLE = IDROLE)
		BEGIN
			DELETE FROM ROLE_MENU
			WHERE  @IDMENU = IDMENU and @IDROLE = IDROLE
			SET @RESULT = 1
		END
		ELSE 
		BEGIN
			SET @RESULT = 0
		END
	END
